<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.2">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="一、创建本地仓库node.js 安装时，一定不要把auto勾选上，否则会装大量的软件awesomium_v1.6.6_sdk_win.exe              #先不用安装， 不一定需要 前期检查：如果不记得是否已安装，进行如下操作进行检测 $ git –version$ node -v$ npm -v  创建ytnetman文件夹  在此文件夹下进行Git bash，执行以下命令：  $">
<meta property="og:type" content="article">
<meta property="og:title" content="利用GIT和HEXO搭建Gitee博客保姆级详细教程">
<meta property="og:url" content="http://example.com/2022/05/06/git_hexo_gitee/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="一、创建本地仓库node.js 安装时，一定不要把auto勾选上，否则会装大量的软件awesomium_v1.6.6_sdk_win.exe              #先不用安装， 不一定需要 前期检查：如果不记得是否已安装，进行如下操作进行检测 $ git –version$ node -v$ npm -v  创建ytnetman文件夹  在此文件夹下进行Git bash，执行以下命令：  $">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-05-06T03:50:00.000Z">
<meta property="article:modified_time" content="2022-05-10T22:36:10.767Z">
<meta property="article:author" content="YTNetMan">
<meta property="article:tag" content="Gitee GIT  GIT HEXO">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://example.com/2022/05/06/git_hexo_gitee/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>利用GIT和HEXO搭建Gitee博客保姆级详细教程 | Hexo</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Hexo</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-schedule">

    <a href="/schedule/" rel="section"><i class="fa fa-calendar fa-fw"></i>日程表</a>

  </li>
        <li class="menu-item menu-item-sitemap">

    <a href="/sitemap.xml" rel="section"><i class="fa fa-sitemap fa-fw"></i>站点地图</a>

  </li>
        <li class="menu-item menu-item-commonweal">

    <a href="/404/" rel="section"><i class="fa fa-heartbeat fa-fw"></i>公益 404</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2022/05/06/git_hexo_gitee/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/ylh.jpg">
      <meta itemprop="name" content="YTNetMan">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Hexo">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          利用GIT和HEXO搭建Gitee博客保姆级详细教程
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2022-05-06 11:50:00" itemprop="dateCreated datePublished" datetime="2022-05-06T11:50:00+08:00">2022-05-06</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-05-11 06:36:10" itemprop="dateModified" datetime="2022-05-11T06:36:10+08:00">2022-05-11</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">教程</span></a>
                </span>
            </span>

          
            <span id="/2022/05/06/git_hexo_gitee/" class="post-meta-item leancloud_visitors" data-flag-title="利用GIT和HEXO搭建Gitee博客保姆级详细教程" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>一、创建本地仓库<br>node.js 安装时，一定不要把auto勾选上，否则会装大量的软件<br>awesomium_v1.6.6_sdk_win.exe              #先不用安装， 不一定需要</p>
<p>前期检查：如果不记得是否已安装，进行如下操作进行检测</p>
<p>$ git –version<br>$ node -v<br>$ npm -v</p>
<ol>
<li>创建ytnetman文件夹</li>
</ol>
<p>在此文件夹下进行Git bash，执行以下命令：</p>
<p> $ npm install hexo-cli -g                                                     #安装hexo<br> $ npm install hexo-deployer-git –save                            #部署远端git 这一步必须要有</p>
<p>$ npm install hexo-renderer-marked –save                     #图片插件</p>
<ol start="2">
<li>创建Hexo文件夹                                                                  #是必须的，因为hexo的初始化需要一个空目录</li>
</ol>
<p>在ytnetman下创建一个Hexo文件夹，进入Hexo文件夹，Git bash，执行以下命令<br>\ytnetman\hexo<br> $ hexo init                                                                                  #初始化hexo，为本地blog框架做准备</p>
<p>至此，Hexo已经初始化了，接下来进行测试<br>二、查看localhost</p>
<ol>
<li>启用本地服务器  \ytnetman\hexo\</li>
</ol>
<p> $ hexo g                #    (generate) 重建<br> $ hexo s                  #  ( server)  开启本地服务器</p>
<p>​    </p>
<ol start="2">
<li>查看Hexo默认页面</li>
</ol>
<p>浏览器地址栏输入<span class="exturl" data-url="aHR0cDovL2xvY2FsaG9zdDo0MDAwLyVFRiVCQyU4QyVFOCVBRSVCRiVFOSU5NyVBRSVFNSU4OCU5RCVFNSVBNyU4QiVFNSU4QyU5NiVFOSVBMSVCNSVFOSU5RCVBMiVFRiVCQyU5QQ==">http://localhost:4000/，访问初始化页面：<i class="fa fa-external-link-alt"></i></span></p>
<p>三、将博客部署到码云Gitee</p>
<p>点击此处查看我的Gitee部署</p>
<ol>
<li>注册 并 登录 到gitee</li>
<li>创建个人仓库<br> 名称和路径都选择ytnetman</li>
</ol>
<ol start="3">
<li>配置SSH密钥（同github一样）</li>
</ol>
<p>注意：要到ytnetman\hexo文件夹下执行以下命令：</p>
<p> // Ctrl+C 关闭本地服务器，然后回到父级目录kris_blog再生成新的ssh<br> $ cd .. </p>
<p>\ytnetman<br> $ ssh-keygen -t rsa -C   *******@qq.com<br> // 填写邮箱地址 gitee登录主要看id和email<br>不用设置密码，一直回车就行。</p>
<ol start="4">
<li>拷贝ssh</li>
</ol>
<p>看到上图，表示已经生成了ssh文件了，拷贝一下吧！<br>C:\Users\Administrator.ssh<br> $ id_rsa.pub</p>
<p>ssh-rsa AAAAB3NzaC1yc2…………..+3wUV8TYKQ………….. ********@qq.com</p>
<ol start="5">
<li>配置Gitee公钥                               #初次架设时使用，以后并不需要重复这步</li>
</ol>
<p>登录自己的gitee，进行以下操作：</p>
<p>打开设置 – 点击SSH公钥 – 输入信息 – 确定 – gitee密码验证 – 公钥配置成功</p>
<p>添加个人公钥  密码验证： *********</p>
<ol start="6">
<li>git测试</li>
</ol>
<p> $ ssh -T <span class="exturl" data-url="bWFpbHRvOiYjMTAzOyYjMTA1OyYjeDc0OyYjNjQ7JiMxMDM7JiN4Njk7JiN4NzQ7JiMxMDE7JiN4NjU7JiM0NjsmIzk5OyYjeDZmOyYjeDZkOw==">&#103;&#105;&#x74;&#64;&#103;&#x69;&#x74;&#101;&#x65;&#46;&#99;&#x6f;&#x6d;<i class="fa fa-external-link-alt"></i></span></p>
<p>  键入yes  -&gt;看是否有success</p>
<p>如果之前没有用过gitee进行公钥配置的话，会报这种错误，故需要在hosts文件(C:\windows\system32\drivers\etc)末尾中添加：212.64.62.174 gitee.com，保存文件并重新git测试，测试通过！</p>
<ol start="7">
<li>配置个人信息</li>
</ol>
<p>我们每次的Commit，Git 会根据我们的git名字ytnetman和邮箱************@qq.com来记录提交，Gitee 会使用这些用户信息进行权限管理，输入以下命令进行个人信息的设置，把名称和邮箱替换成你自己的，名字可以不是 Gitee 的昵称，但为了方便记忆，建议与 Gitee 一致哦！</p>
<p> $ git config –global user.name ytnetman<br> $ git config –global user.email *********@qq.com<br>All Right ! 至此，我们就很顺畅地配置好了SSH公钥了，本机已经成功连接到了自己的Gitee<br>四、将本地的Hexo文件提交到自己的Gitee仓库               #只是初次架设使用</p>
<ol>
<li><p>打开仓库，复制ssh链接</p>
</li>
<li><p>更改配置信息                                                               #更换办公环境时，这步是需要的，不只是初次架设</p>
</li>
</ol>
<p>打开本地目录中的配置文件 \ytnetman\Hexo_config.yml</p>
<p>marked:                                                #<br>  prependRoot: true                             #者行为了显示图片的需要<br>  postAsset: true                                   #</p>
<p>deploy:<br>  type:  ‘git’<br>  repository:  <span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20vWVROZXRNYW4veXRuZXRtYW4uZ2l0">https://gitee.com/YTNetMan/ytnetman.git<i class="fa fa-external-link-alt"></i></span><br>  branch:  master</p>
<p> 3初始的主题太low，这时可以更换主题了。<br>官网地址：  <span class="exturl" data-url="aHR0cHM6Ly9oZXhvLmlvL3RoZW1lcy8=">https://hexo.io/themes/<i class="fa fa-external-link-alt"></i></span><br>下载的是zip文件，我下的是 smackdown。<br>把文件解压，文件夹\hexo-theme-smackdown-master   改名\smackdown<br>打开本地目录中的配置文件 \ytnetman\Hexo_config.yml  改为<br>    ## Themes: <span class="exturl" data-url="aHR0cHM6Ly9oZXhvLmlvL3RoZW1lcy8=">https://hexo.io/themes/<i class="fa fa-external-link-alt"></i></span><br>    theme: smackdown<br>打开本地目录中的配置文件 \ytnetman\Hexo\smackdown_config.yml  进行主题配置</p>
<pre><code># SubNav
subnav:
# github: &quot;#&quot;

favicon: https://pic4.zhimg.com/v2-1943496de7162427e3ec2cbd53b570f7_r.jpg
#你的头像url
avatar: https://pic4.zhimg.com/v2-1943496de7162427e3ec2cbd53b570f7_r.jpg
</code></pre>
<ol start="4">
<li>配置文件修改好后，cd Hexo调整当前目录为Hexo，执行以下指令：<br> 在h命令窗口执行命令：(一定要在\ytnetman\hexo目录下执行否则会出现确实git错误）<br> npm install hexo-deployer-git –save<br>  #说明：安装插件—推送本地文件到远程仓库<br>  $ hexo g -d</li>
</ol>
<p>网站部署</p>
<pre><code>$ hexo clean  //清除缓存文件db.json和已生成的静态文件public
$ hexo g   //生成网站静态文件到默认设置的public文件夹
$ hexo d   //部署网站到设定的仓库
</code></pre>
<p>以上信息，说明配置已经OK了，但也有报以下错误的：</p>
<p> ERROR Deployer not found: git</p>
<p>上面配置文件中type属性，’git‘要有单引号，我刚开始没加的时候，每次执行hexo g -d，配置文件就会被重置，需要重新配置。这个单引号差点气哭啊，忙活半天，结果404！！！还好我检查了下配置文件，把单引号加了上去！！！</p>
<p>原始此处的缺省配置是这样的，所以要注重每一个细节啊！！！</p>
<ol start="5">
<li><p>Nice ! 文件commit成功 ！</p>
</li>
<li><p>查看Gitee仓库  <span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20veXRuZXRtYW4=">https://gitee.com/ytnetman<i class="fa fa-external-link-alt"></i></span></p>
</li>
</ol>
<p>好棒呀，虽然已经凌晨两点咯，边配置变写说明文档，有点儿耗时，但希望结果是好的，真棒！</p>
<ol start="7">
<li>开启Gitee pages服务，重点！！！     #初次安装使用</li>
</ol>
<p>打开自己的仓库 – 点击“服务” – 开启Gitee pages服务<br>    什么是Gitee服务？详情参考使用帮助<br>    码云 Pages 是一个免费的静态网页托管服务，您可以使用 码云 Pages 托管博客、项目官网等静态网页。如果您使用过 Github Pages 那么您会很快上手使用码云的 Pages服务。目前码云 Pages 支持 Jekyll、Hugo、Hexo编译静态资源。<br>8. 访问博客主页<br>    分支选择master,目录为空<br>    提示：已开启 Gitee Pages 服务，网站地址： <span class="exturl" data-url="aHR0cDovL3l0bmV0bWFuLmdpdGVlLmlvLw==">http://ytnetman.gitee.io<i class="fa fa-external-link-alt"></i></span><br>    打开该网址可进行查看</p>
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(\img)(<span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20veXRuZXRtYW4veXRuZXRtYW4vbWFzdGVyL2ltZ3MvaW5pdF9pbmRleC5qcGcpXQ==">https://gitee.com/ytnetman/ytnetman/master/imgs/init_index.jpg)]<i class="fa fa-external-link-alt"></i></span></p>
<p>【Gitee使用帮助】如果你想你的 pages 首页访问地址不带二级目录，如ytnetman.gitee.io，你需要建立一个与自己个性地址同名的仓库，如 <span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20veXRuZXRtYW4=">https://gitee.com/ytnetman<i class="fa fa-external-link-alt"></i></span> 这个用户，想要创建一个自己的站点，但不想以子目录的方式访问，想以ipvb.gitee.io直接访问，那么他就可以创建一个名字为ytnetman的仓库 </p>
<p>五、在博客上发表文章测试</p>
<ol>
<li>按照以下指令，创建一篇新文章，文章标题为article_test</li>
</ol>
<p> $ hexo n article_test</p>
<p>也可以直接在 \Hexo\source_posts 目录下右键鼠标新建文本文档，改后缀为 .md 即可，这种方法比较方便，或者直接使用Typora工具来写，注意书写格式！</p>
<p>文章标题，标签，分类，封面图片，摘要等，可以在 Front-matter 里面配置（Front-matter 是文件最上方以 — 分隔的区域，用于指定个别文件的变量，官方文档：<span class="exturl" data-url="aHR0cHM6Ly9oZXhvLmlvL3poLWNuL2RvY3MvZnJvbnQtbWF0dGVy">https://hexo.io/zh-cn/docs/front-matter<i class="fa fa-external-link-alt"></i></span> ），举个例子：<br>参数    描述    默认值<br>layout    布局<br>title    标题    文章的文件名<br>date    建立日期    文件建立日期<br>updated    更新日期    文件更新日期<br>comments    开启文章的评论功能    true<br>tags    标签（不适用于分页）<br>categories    分类（不适用于分页）<br>permalink    覆盖文章网址<br>keywords    仅用于 meta 标签和 Open Graph 的关键词（不推荐使用）    </p>
<p>当我们用编辑器写好文章后，可以commit一下</p>
<p> $ hexo g -d</p>
<p>然后就可以打开首页查看添加的article_test文章了呀<br>六、自定义域名（可选）</p>
<p>发表博客</p>
<p>在发表博客之前，先说说hexo1下的source和public两个文件夹</p>
<pre><code>source文件夹：下面有子文件夹_posts，在_posts下面存放的是markdown文件（原本是有一个）
在这里插入图片描述
public文件夹：下面的所有内容将被推送到码云中的指定仓库中，这个之后说。主要是该文件夹中会保存所有我们在浏览器中看得到的html文件
在这里插入图片描述
所以我们编写的博客应该保存为markdown文件，然后将文件放到source/_posts下，由Hexo自动将该文件转换成对应的html文件并保存到public文件夹中
</code></pre>
<p>下面来实现发表博客</p>
<pre><code>用markdown编辑器（我用的Typora）编辑好一篇博客，然后保存为home.md格式
在这里插入图片描述
注意：
# 博客内部开头要加 -

# title: Self-discipline        #说明：文章标题

# date: 2019-08-13 17:00:00        #说明：文章日期格式：2018-05-30 15:20:36

# tags: welcome     #说明：文章标签

#  categories: life       #说明：文章分类
</code></pre>
<p>冒号后面要有一个空格，categories后空一行，要有3个以上的 - （用来和文章内容区分）</p>
<pre><code>将编辑好的.md文件放到E:\ytnetman\hexo\source\_posts中
打开git bash命令窗口（强调在hexo1中打开），依次执行命令：

&gt;hexo clean
&gt;hexo g -s
</code></pre>
<p>最后刷新localhost:4000，就可以看到刚写得文章了</p>
<p>绑定邮箱后，通过命令git config user.email 配置绑定邮箱，提交代码可累计在平台上的贡献度。</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Gitee-GIT-GIT-HEXO/" rel="tag"># Gitee GIT  GIT HEXO</a>
          </div>

        
  <div class="post-widgets">
    <div class="wp_rating">
      <div id="wpac-rating"></div>
    </div>
  </div>


        
    <div class="post-nav">
      <div class="post-nav-item"></div>
      <div class="post-nav-item">
    <a href="/2022/05/06/pycharm_gitee/" rel="next" title="利用pycharm实现gitee项目的克隆和推送操作">
      利用pycharm实现gitee项目的克隆和推送操作 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="YTNetMan"
      src="/images/ylh.jpg">
  <p class="site-author-name" itemprop="name">YTNetMan</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">7</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly95dG5ldG1hbi5naXRlZS5pbw==" title="Gitee → https:&#x2F;&#x2F;ytnetman.gitee.io"><i class="fab fa-github fa-fw"></i>Gitee</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="bWFpbHRvOnlhbmdxaWd1YW5nQDE4OS5jbg==" title="E-Mail → mailto:yangqiguang@189.cn"><i class="fa fa-envelope fa-fw"></i>E-Mail</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly93ZWliby5jb20veXRuZXRtYW4=" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;ytnetman"><i class="fab fa-weibo fa-fw"></i>Weibo</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20veXRuZXRtYW4=" title="Google → https:&#x2F;&#x2F;plus.google.com&#x2F;ytnetman"><i class="fab fa-google fa-fw"></i>Google</span>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">YTNetMan</span>
</div>
  <div class="powered-by">由 <span class="exturl theme-link" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & <span class="exturl theme-link" data-url="aHR0cHM6Ly9waXNjZXMudGhlbWUtbmV4dC5vcmc=">NexT.Pisces</span> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>






<script>
  (function() {
    function leancloudSelector(url) {
      url = encodeURI(url);
      return document.getElementById(url).querySelector('.leancloud-visitors-count');
    }

    function addCount(Counter) {
      var visitors = document.querySelector('.leancloud_visitors');
      var url = decodeURI(visitors.id);
      var title = visitors.dataset.flagTitle;

      Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url })))
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length > 0) {
            var counter = results[0];
            leancloudSelector(url).innerText = counter.time + 1;
            Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
              .catch(error => {
                console.error('Failed to save visitor count', error);
              });
          } else {
              leancloudSelector(url).innerText = 'Counter not initialized! More info at console err msg.';
              console.error('ATTENTION! LeanCloud counter has security bug, see how to solve it here: https://github.com/theme-next/hexo-leancloud-counter-security. \n However, you can still use LeanCloud without security, by setting `security` option to `false`.');
            
          }
        })
        .catch(error => {
          console.error('LeanCloud Counter Error', error);
        });
    }

    function showTime(Counter) {
      var visitors = document.querySelectorAll('.leancloud_visitors');
      var entries = [...visitors].map(element => {
        return decodeURI(element.id);
      });

      Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url: { '$in': entries } })))
        .then(response => response.json())
        .then(({ results }) => {
          for (let url of entries) {
            let target = results.find(item => item.url === url);
            leancloudSelector(url).innerText = target ? target.time : 0;
          }
        })
        .catch(error => {
          console.error('LeanCloud Counter Error', error);
        });
    }

    let { app_id, app_key, server_url } = {"enable":true,"app_id":null,"app_key":null,"server_url":null,"security":true};
    function fetchData(api_server) {
      var Counter = (method, url, data) => {
        return fetch(`${api_server}/1.1${url}`, {
          method,
          headers: {
            'X-LC-Id'     : app_id,
            'X-LC-Key'    : app_key,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data)
        });
      };
      if (CONFIG.page.isPost) {
        if (CONFIG.hostname !== location.hostname) return;
        addCount(Counter);
      } else if (document.querySelectorAll('.post-title-link').length >= 1) {
        showTime(Counter);
      }
    }

    let api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;

    if (api_server) {
      fetchData(api_server);
    } else {
      fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
        .then(response => response.json())
        .then(({ api_server }) => {
          fetchData('https://' + api_server);
        });
    }
  })();
</script>


      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  



  <script>
  if (CONFIG.page.isPost) {
    wpac_init = window.wpac_init || [];
    wpac_init.push({
      widget: 'Rating',
      id    : ,
      el    : 'wpac-rating',
      color : 'fc6423'
    });
    (function() {
      if ('WIDGETPACK_LOADED' in window) return;
      WIDGETPACK_LOADED = true;
      var mc = document.createElement('script');
      mc.type = 'text/javascript';
      mc.async = true;
      mc.src = '//embed.widgetpack.com/widget.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
    })();
  }
  </script>












  

  

</body>
</html>
